<script setup>
import {cancelCon} from "@/api/contract/myContract.js";
import {backMyConList} from "@/utils/backList.js";

const {proxy} = getCurrentInstance()
const prop = defineProps({
  conId: {
    type: Number,
  },
  isCancel: {
    type: Boolean,
  }
})

function handleCancel() {
  proxy.$modal.confirmAndExecuteJS('确认要废弃当前合同记录？', cancelCon, prop.conId, backMyConList)
}
</script>

<template>
  <el-button type="info" @click="handleCancel" v-if="isCancel">废 弃</el-button>
</template>
